table.RECORD_DATA_GET Function

Syntax

Record_Data as B = Record_Data_Get([N record_number])

Arguments

record_number

Optional. Default = Current record. The number of a record.

Description

Return the all the data from the current records field as a blob.

Discussion

The <TBL>.RECORD_DATA_GET() method copies all the field values from Record_Number (or the current record if Record_Number is not specified) to a blob variable. Note : You can use PROPERTY_TO_STRING() and PROPERTY_FROM_STRING() to move data between tables with different structures.

Example

This script copies the current record to a blob variable. It then opens a table with an identical structure and pastes in a new record. The script is attached to a button on a form.

dim record_data as B
dim tbl as P
tbl = table.current()
record_data = tbl.record_data_get()
target = table.open("clone")
target.enter_begin()
target.record_data_set(record_data)
target.enter_end(.T.)
target.close()

See Also